﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="Vouchers" targetNamespace="http://tempuri.org/Vouchers.xsd" xmlns:mstns="http://tempuri.org/Vouchers.xsd" xmlns="http://tempuri.org/Vouchers.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Web.config" AppSettingsPropertyName="ShopConnectionString1" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="ShopConnectionString1 (Web.config)" ParameterPrefix="@" PropertyReference="AppConfig.System.Configuration.ConfigurationManager.0.ConnectionStrings.ShopConnectionString1.ConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="VouchersTableAdapter" GeneratorDataComponentClassName="VouchersTableAdapter" Name="Vouchers" UserDataComponentName="VouchersTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="ShopConnectionString1 (Web.config)" DbObjectName="Shop.dbo.Vouchers" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="false" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[Vouchers] WHERE (([IdVoucher] = @Original_IdVoucher))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdVoucher" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdVoucher" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[Vouchers] ([Guid], [Type], [Date], [Value], [AcceptValue], [CustomerId], [Used], [GeneratedRealizationId], [UsedRealizationId]) VALUES (@Guid, @Type, @Date, @Value, @AcceptValue, @CustomerId, @Used, @GeneratedRealizationId, @UsedRealizationId)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Guid" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Guid" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Type" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Type" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Date" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Value" Precision="10" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="Value" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@AcceptValue" Precision="12" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="AcceptValue" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Used" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Used" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@GeneratedRealizationId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="GeneratedRealizationId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@UsedRealizationId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="UsedRealizationId" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT IdVoucher, Guid, Type, Date, Value, AcceptValue, CustomerId, Used, GeneratedRealizationId, UsedRealizationId FROM dbo.Vouchers</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[Vouchers] SET [Guid] = @Guid, [Type] = @Type, [Date] = @Date, [Value] = @Value, [AcceptValue] = @AcceptValue, [CustomerId] = @CustomerId, [Used] = @Used, [GeneratedRealizationId] = @GeneratedRealizationId, [UsedRealizationId] = @UsedRealizationId WHERE (([IdVoucher] = @Original_IdVoucher))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Guid" Direction="Input" ParameterName="@Guid" Precision="0" ProviderType="UniqueIdentifier" Scale="0" Size="0" SourceColumn="Guid" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Type" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Type" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="DateTime" Direction="Input" ParameterName="@Date" Precision="0" ProviderType="DateTime" Scale="0" Size="0" SourceColumn="Date" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@Value" Precision="10" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="Value" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Decimal" Direction="Input" ParameterName="@AcceptValue" Precision="12" ProviderType="Decimal" Scale="2" Size="0" SourceColumn="AcceptValue" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@CustomerId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="CustomerId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Boolean" Direction="Input" ParameterName="@Used" Precision="0" ProviderType="Bit" Scale="0" Size="0" SourceColumn="Used" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@GeneratedRealizationId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="GeneratedRealizationId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="true" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@UsedRealizationId" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="UsedRealizationId" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_IdVoucher" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="IdVoucher" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="IdVoucher" DataSetColumn="IdVoucher" />
              <Mapping SourceColumn="Guid" DataSetColumn="Guid" />
              <Mapping SourceColumn="Type" DataSetColumn="Type" />
              <Mapping SourceColumn="Date" DataSetColumn="Date" />
              <Mapping SourceColumn="Value" DataSetColumn="Value" />
              <Mapping SourceColumn="AcceptValue" DataSetColumn="AcceptValue" />
              <Mapping SourceColumn="CustomerId" DataSetColumn="CustomerId" />
              <Mapping SourceColumn="Used" DataSetColumn="Used" />
              <Mapping SourceColumn="GeneratedRealizationId" DataSetColumn="GeneratedRealizationId" />
              <Mapping SourceColumn="UsedRealizationId" DataSetColumn="UsedRealizationId" />
            </Mappings>
            <Sources />
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="Vouchers" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="Vouchers" msprop:Generator_DataSetName="Vouchers">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Vouchers" msprop:Generator_UserTableName="Vouchers" msprop:Generator_RowDeletedName="VouchersRowDeleted" msprop:Generator_TableClassName="VouchersDataTable" msprop:Generator_RowChangedName="VouchersRowChanged" msprop:Generator_RowClassName="VouchersRow" msprop:Generator_RowChangingName="VouchersRowChanging" msprop:Generator_RowEvArgName="VouchersRowChangeEvent" msprop:Generator_RowEvHandlerName="VouchersRowChangeEventHandler" msprop:Generator_TablePropName="_Vouchers" msprop:Generator_TableVarName="tableVouchers" msprop:Generator_RowDeletingName="VouchersRowDeleting">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="IdVoucher" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_UserColumnName="IdVoucher" msprop:Generator_ColumnPropNameInRow="IdVoucher" msprop:Generator_ColumnVarNameInTable="columnIdVoucher" msprop:Generator_ColumnPropNameInTable="IdVoucherColumn" type="xs:int" />
              <xs:element name="Guid" msdata:DataType="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" msprop:Generator_UserColumnName="Guid" msprop:Generator_ColumnPropNameInRow="Guid" msprop:Generator_ColumnVarNameInTable="columnGuid" msprop:Generator_ColumnPropNameInTable="GuidColumn" type="xs:string" />
              <xs:element name="Type" msprop:Generator_UserColumnName="Type" msprop:Generator_ColumnPropNameInRow="Type" msprop:Generator_ColumnVarNameInTable="columnType" msprop:Generator_ColumnPropNameInTable="TypeColumn" type="xs:int" />
              <xs:element name="Date" msprop:Generator_UserColumnName="Date" msprop:Generator_ColumnPropNameInRow="Date" msprop:Generator_ColumnVarNameInTable="columnDate" msprop:Generator_ColumnPropNameInTable="DateColumn" type="xs:dateTime" />
              <xs:element name="Value" msprop:Generator_UserColumnName="Value" msprop:Generator_ColumnPropNameInRow="Value" msprop:Generator_ColumnVarNameInTable="columnValue" msprop:Generator_ColumnPropNameInTable="ValueColumn" type="xs:decimal" minOccurs="0" />
              <xs:element name="AcceptValue" msprop:Generator_UserColumnName="AcceptValue" msprop:Generator_ColumnPropNameInRow="AcceptValue" msprop:Generator_ColumnVarNameInTable="columnAcceptValue" msprop:Generator_ColumnPropNameInTable="AcceptValueColumn" type="xs:decimal" />
              <xs:element name="CustomerId" msprop:Generator_UserColumnName="CustomerId" msprop:Generator_ColumnPropNameInRow="CustomerId" msprop:Generator_ColumnVarNameInTable="columnCustomerId" msprop:Generator_ColumnPropNameInTable="CustomerIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="Used" msprop:Generator_UserColumnName="Used" msprop:Generator_ColumnPropNameInRow="Used" msprop:Generator_ColumnVarNameInTable="columnUsed" msprop:Generator_ColumnPropNameInTable="UsedColumn" type="xs:boolean" />
              <xs:element name="GeneratedRealizationId" msprop:Generator_UserColumnName="GeneratedRealizationId" msprop:Generator_ColumnPropNameInRow="GeneratedRealizationId" msprop:Generator_ColumnVarNameInTable="columnGeneratedRealizationId" msprop:Generator_ColumnPropNameInTable="GeneratedRealizationIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="UsedRealizationId" msprop:Generator_UserColumnName="UsedRealizationId" msprop:Generator_ColumnPropNameInRow="UsedRealizationId" msprop:Generator_ColumnVarNameInTable="columnUsedRealizationId" msprop:Generator_ColumnPropNameInTable="UsedRealizationIdColumn" type="xs:int" minOccurs="0" />
              <xs:element name="TypeString" msprop:Generator_UserColumnName="TypeString" msprop:nullValue="_empty" msprop:Generator_ColumnVarNameInTable="columnTypeString" msprop:Generator_ColumnPropNameInTable="TypeStringColumn" msprop:Generator_ColumnPropNameInRow="TypeString" type="xs:string" minOccurs="0" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Vouchers" />
      <xs:field xpath="mstns:IdVoucher" />
    </xs:unique>
  </xs:element>
</xs:schema>